<template>
	<view>
		<view class="container">
			<view>会员注册</view>
			<input class="input" type="text" v-model="user.userName" placeholder="手机号/邮箱" placeholder-class="placeholder" />
			<input class="input" type="text" v-model="user.password" placeholder="密码(最少6位)" placeholder-class="placeholder" />
			<input class="input" type="text" v-model="user.nickName" placeholder="昵称" placeholder-class="placeholder" />
			<button type="default" @click="register">注册</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user:{
					userName:'',
					password:'',
					nickName:''
				}
			}
		},
		methods: {
			register(){
				this.$myRequist({
					url: "/user/register",
					method:"post",
					data:this.user
				}).then(res => {
					this.listData = res.data.rows;
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.container>*{
	color: white;
	text-align: center;
	margin: 22px;

}
.container button{
	background-color: $uni-bg-color-hover;
}
.placeholder{
	color: $uni-text-color-grey;
}
</style>